/**
 * 2017年2月24日
 * 温州两张牌池
 */

var cardPool = [];

var cards = ['D1', 'C2', 'A2', 'D3', 'D4', 'C4', 'B4', 'A4', 'C5', 'A5', 'D6', 'C6', 'B6', 'A6', 'D7', 'C7', 'B7', 'A7', 'D8', 'C8', 'B8', 'A8', 'C9', 'A9', 'D10', 'C10', 'B10', 'A10', 'C11', 'A11', 'C12', 'A12'];

function randomSort() {
    return Math.random() > 0.5;
}

function next() {
    if (cardPool.length <= 1) {
        cardPool = cardPool.concat(cards.sort(randomSort));
    }
    return cardPool.shift();
}

// var exp = module.exports;

exports.cardPool = cardPool;
exports.next = next;
